package edu.hwadee.BEIS.entity;
// default package

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * Certificate entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "certificate", catalog = "beis")

public class Certificate implements java.io.Serializable {

	// Fields

	private Integer certificateId;
	private String userType;
	private String code;

	// Constructors

	/** default constructor */
	public Certificate() {
	}

	/** minimal constructor */
	public Certificate(String userType, String code) {
		this.userType = userType;
		this.code = code;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")

	@Column(name = "certificate_id", unique = true, nullable = false)

	public Integer getCertificateId() {
		return this.certificateId;
	}

	public void setCertificateId(Integer certificateId) {
		this.certificateId = certificateId;
	}

	@Column(name = "user_type", nullable = false, length = 5)

	public String getUserType() {
		return this.userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	@Column(name = "code", nullable = false, length = 10)

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}


}